﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace Group_Project_Book_Store
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
        DatabaseClasses.DatabaseManagment dataManagment = new DatabaseClasses.DatabaseManagment();
        ItemWindow ItemWindowForm;
        searchWindow SearchWindowForm;
        CreateNewInvoice CreateNewInvoiceForm;

        public MainWindow()
        {
            Application.Current.ShutdownMode = ShutdownMode.OnMainWindowClose;
            InitializeComponent();
            ItemWindowForm = new ItemWindow();
            SearchWindowForm = new searchWindow();
            CreateNewInvoiceForm = new CreateNewInvoice();
        }

        private void OpenSearchForm_Click(object sender, RoutedEventArgs e)
        {
            this.Hide();
            SearchWindowForm.ShowDialog();
            this.Show();
        }

        private void OpenItemWindow_Click(object sender, RoutedEventArgs e)
        {
            this.Hide();
            ItemWindowForm.ShowDialog();
            this.Show();
        }

        private void CreateNewInvoiceWindow(object sender, RoutedEventArgs e)
        {
            this.Hide();
            CreateNewInvoiceForm.ShowDialog();
            this.Show();
        }
    }
}
